const state = {
  leftVisible: false,
  rightVisible: false,
  bottomVisible: false,
  isShowContext: true,
  isUpload: false
}

const mutations = {
  SET_LEFT_VISIBLE: (state, val) => {
    state.leftVisible = val
  },
  SET_RIGHT_VISIBLE: (state, val) => {
    state.rightVisible = val
  },
  SET_BOTTOM_VISIBLE: (state, val) => {
    state.bottomVisible = val
  },
  SET_IS_SHOW_CONTEXT: (state, val) => {
    state.isShowContext = val
  },
  SET_IS_UPLOAD: (state, val) => {
    state.isUpload = val
  }
}

const actions = {
  setleftvisible({ commit, state }, val) {
    commit('SET_LEFT_VISIBLE', val)
  },
  setrightvisible({ commit, state }, val) {
    commit('SET_RIGHT_VISIBLE', val)
  },
  setbottomvisible({ commit, state }, val) {
    commit('SET_BOTTOM_VISIBLE', val)
  },
  setisshowcontext({ commit, state }, val) {
    commit('SET_IS_SHOW_CONTEXT', val)
  },
  setisupload({ commit, state }, val) {
    commit('SET_IS_UPLOAD', val)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
